package com.design.memento.football;

/**
 * @author xiemiao
 * @description
 * @date 2023/08/18
 */
public class FootballMatch {

    private String state;

    public FootballMatch(String state) {
        this.state = state;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public Memento saveStateToMemento() {
        return new Memento(state);
    }

    public void restoreStateFromMemento(Memento memento) {
        state = memento.getState();
    }

    @Override
    public String toString() {
        return "FootballMatch{" +
                "state='" + state + '\'' +
                '}';
    }
}
